package com.gua.common.exception;

import com.gua.common.response.AjaxResultEnum;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class BusinessExecption extends RuntimeException{

	private static final long serialVersionUID = -1325705439248696077L;

	private int code;
	
	private String errorMessage;
	
	public BusinessExecption() {
	
	}
	
	public BusinessExecption(int code) {
		this.code = code;
	}

	public BusinessExecption(String errorMessage) {
		super(errorMessage);
		this.code = AjaxResultEnum.FAIL.getCode();
		this.errorMessage = errorMessage;
	}
	
	public BusinessExecption(int code, String errorMessage) {
		super(errorMessage);
		this.code = code;
		this.errorMessage = errorMessage;
	}
	
}
